<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{$menuInfo['name']}</title>
    <link href="Public/favicon.ico" type="image/x-icon" rel="shortcut icon">
    <link rel="stylesheet" type="text/css" href="__ADMIN__/css/base.css" media="all">
    <link rel="stylesheet" type="text/css" href="__ADMIN__/css/common.css" media="all">
    <link rel="stylesheet" type="text/css" href="__ADMIN__/css/module.css">
    <link rel="stylesheet" type="text/css" href="__ADMIN__/css/style.css" media="all">
	<link rel="stylesheet" type="text/css" href="__ADMIN__/css/default_color.css" media="all">
     <!--[if lt IE 9]>
    <script type="text/javascript" src="Public/static/jquery-1.10.2.min.js"></script>
    <![endif]--><!--[if gte IE 9]><!-->
    <script type="text/javascript" src="__ADMIN__/js/jquery-2.0.3.min.js"></script>
    <script type="text/javascript" src="__ADMIN__/js/jquery.mousewheel.js"></script>
    <!--<![endif]-->
    
</head>
<body>
    <!-- 头部 -->
    <include file="./Public/Admin/tpl/header.html" />
    <!-- /头部 -->

    <!-- 边栏 -->
    <include file="./Public/Admin/tpl/left.html" />
    <!-- /边栏 -->

    <!--内容区 -->
    <div id="main-content">
        <div id="top-alert" class="fixed alert alert-error" style="display: none;">
            <button class="close fixed" style="margin-top: 4px;">&times;</button>
            <div class="alert-content">这是内容</div>
        </div>

        <div id="main" class="main">
            <!-- 标题 -->
            <div class="main-title">
                <h2>{$menuInfo['name']}管理({$count})</h2>
            </div>

            <!-- 按钮工具栏 -->
            <div class="cf">
                <div class="fl">
                    <if condition="in_array('add',$access)"><a href="{$CURRENT_CONTROLLER}/add" class="btn">新增</a></if>
                    <if condition="in_array('del',$access)"><a href="{$CURRENT_CONTROLLER}/del" target-form="ids" class="btn ajax-post confirm">删除</a></if>
                    <if condition="in_array('excel',$access)"><a href="{$CURRENT_CONTROLLER}/excell" class="btn">导出EXCEL</a></if>
                </div>

                <!-- 高级搜索 -->
                <if condition="in_array('search',$access)">
                    <div class="search-form fr cf">
                        <!--补充区域-->
                        <!--<div class="sleft">-->
                            <!--<input type="text" id="test" name="test" class="text input-2x" value="" placeholder="补充条件" />-->
                        <!--</div>-->

                        <div class="sleft">
                            <div class="drop-down">
                                <span id="sch-sort-txt" class="sort-txt" data="">所有</span>
                                <i class="arrow arrow-down"></i>
                                <ul id="sub-sch-menu" class="nav-list hidden">
                                    <li><a href="javascript:;" value="">所有</a></li>
                                    <!--<li><a href="javascript:;" value="1 ">正常</a></li>-->
                                    <!--<li><a href="javascript:;" value="0">禁用</a></li>-->
                                    <!--<li><a href="javascript:;" value="2">待审核</a></li>-->
                                </ul>
                            </div>
                            <input type="text" name="name" class="search-input" value="" placeholder="请输入关键词">
                            <a class="sch-btn" href="javascript:;" id="search" url=""><i class="btn-search"></i></a>
                        </div>

                        <div class="btn-group-click adv-sch-pannel fl">
                            <button class="btn">高 级<i class="btn-arrowdown"></i></button>
                            <div class="dropdown cf">
                                <div class="row">
                                    <label>创建时间：</label>
                                    <input type="text" id="time-start" name="time-start" class="datetimepicker text input-2x" value="" placeholder="起始时间" /> -
                                    <div class="input-append date" id="datetimepicker"  style="display:inline-block">
                                        <input type="text" id="time-end" name="time-end" class="datetimepicker text input-2x" value="" placeholder="结束时间" />
                                        <span class="add-on"><i class="icon-th"></i></span>
                                    </div>
                                </div>
                                <!--补充区域-->
                                <!--<div class="row">-->
                                    <!--<label>创建者：</label>-->
                                    <!--<input type="text" name="nickname" class="text input-2x" value="" placeholder="请输入用户名">-->
                                <!--</div>-->
                            </div>
                        </div>
                    </div>
                </if>
            </div>

            <!-- 列表 -->
            <include file="./Public/Admin/tpl/list.html" />
            <!-- /列表 -->

            <!-- 分页 -->
            <include file="./Public/Admin/tpl/page.html" />
            <!-- /分页 -->

            <!-- 底部 -->
            <include file="./Public/Admin/tpl/footer.html" />
            <!-- /底部 -->
        </div>
    </div>
    <!--/内容区 -->
</body>
</html>
<script type="text/javascript">
    //按点击的字段升降序
    function order(obj){
        var order = $(obj).attr("name");
        //var pattern = $(obj).find("span").text();
        var pattern = "{$_GET['order']}";
        if(pattern.indexOf('desc') > 0){
            window.location.href='{$current_url}?order='+order;
        }else{
            window.location.href='{$current_url}?order='+order+' desc';
        }
    }

    //直接跳转到某页
    function pageTurn(){
        var page = $('#selectPage').val();
        var totalNum = "{$totalNum}";
        if(page){
            if(page < 1 || page > totalNum){
                alert('页数必须为1-'+totalNum);
                $('#selectPage').val('');
            }else{
                window.location.href='{$current_request_url}/p/'+page;
            }
        }
    }
</script>